package com.leigq.dynamic.task.web;

/**
 * 动态任务抽象基类
 *
 * @author leiguoqing
 */
public abstract class BaseDynamicTask implements IDynamicTask {

    /**
     * Type string.
     *
     * @return the string
     */
    @Override
    public String type() {
        return this.getClass().getSimpleName().toLowerCase();
    }


    /**
     * To string string.
     *
     * @return the string
     */
    @Override
    public String toString() {
        return "TriggerTask{" +
                "type=" + type() +
                ", task=" + getTask() +
                "cronTrigger=" + getTrigger().getExpression() +
                '}';
    }
}